From b6c3cf4eee7af05d7bd5ce4fd9f421a2ae03d60b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 12 Feb 2023 09:56:32 -0500 Subject: [PATCH] gl: Maintain state when truncating When we truncate the command queue because it is too big, we were messing up our state accounting and running into criticals as a consequence. This can be reproduced by opening a well-populated fishbowl demo in the inspectors recorder. Fixes: #5188 --- gsk/gl/gskglcommandqueue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 673958e579..72d2b320d0 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -570,7 +570,10 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self) g_assert (self->batches.len > 0); if (will_ignore_batch (self)) - return; + { + self->in_draw = FALSE; + return; + } batch = gsk_gl_command_batches_tail (&self->batches); -- 2.30.2